package com.github.llyb120.performance.generator;

import cn.hutool.core.util.RandomUtil;

/**
 * @Author: Administrator
 * @Date: 9/10/2021 3:19 PM
 */
public class UserNameGenerator implements Generator<String>{

    int min = 5;
    int max = 10;

    public UserNameGenerator() {
    }

    public UserNameGenerator(int min, int max) {
        this.min = min;
        this.max = max;
    }

    public String generate() throws Exception {
        int length = RandomUtil.randomInt(min,max);
        return RandomUtil.randomString(length);
    }

}
